home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
Buch
/
Obutton2.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-22
|
2KB
|
75 lines
//---------------------------------------------------------------------------
#ifndef ObuttonH
#define ObuttonH
//---------------------------------------------------------------------------
#include <vcl\SysUtils.hpp>
#include <vcl\Controls.hpp>
#include <vcl\Classes.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TOButton : public TCustomControl
{
private:
TColor Color;
void __fastcall SetColor(TColor OBrush, TColor OPen);
protected:
bool Pressed;
virtual void __fastcall Paint(void);
virtual void __fastcall MouseDown
(TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
virtual void __fastcall MouseUp
(TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
public:
void __fastcall SetSize (TRect Rechteck);
__fastcall TOButton(TComponent* Owner);
__fastcall TOButton(TComponent* Owner, TColor Farbe);
__fastcall TOButton(TComponent* Owner, TRect Rechteck);
__published:
__property OnClick;
__property OnDblClick;
__property OnMouseDown;
__property OnMouseUp;
__property OnMouseMove;
__property OnStartDrag;
__property OnEndDrag;
__property OnDragDrop;
__property OnDragOver;
__property OnEnter;
__property OnExit;
__property OnKeyPress;
__property OnKeyDown;
__property OnKeyUp;
};
class TOOButton : public TOButton
{
protected:
virtual void __fastcall MouseDown
(TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
virtual void __fastcall MouseUp
(TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
public:
__fastcall TOOButton(TComponent* Owner);
__fastcall TOOButton(TComponent* Owner, TColor Farbe);
__fastcall TOOButton(TComponent* Owner, TRect Rechteck);
__published:
__property OnClick;
__property OnDblClick;
__property OnMouseDown;
__property OnMouseUp;
__property OnMouseMove;
__property OnStartDrag;
__property OnEndDrag;
__property OnDragDrop;
__property OnDragOver;
__property OnEnter;
__property OnExit;
__property OnKeyPress;
__property OnKeyDown;
__property OnKeyUp;
};
//---------------------------------------------------------------------------
#endif